<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('customer_complaint_records', function (Blueprint $table) {
            $table->id();
            $table->integer('shop_manage_id')->default(0)->comment('商店id');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->tinyInteger('is_read')->default(1)->comment('是否已读1未读2已读');
            $table->string('operator_name')->default('')->comment('更新人');
            $table->string('operator_department')->default('')->comment('更新人部门');
            $table->string('operator_time')->default('')->comment('更新时间');
        });
        \DB::statement("ALTER TABLE `customer_complaint_records` comment '客户投诉记录'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('customer_complaint_records');
    }
};
